import {View} from '@tarojs/components'

const CountCheckTime: React.FC<{hours?: number}> = ({hours}): JSX.Element => {
  if (hours === undefined) {
    return (
      <View className="w-138 h-19 mx-auto mt-4 bg-primary_half rounded-2"></View>
    )
  } else {
    return (
      <View className="h-19 leading-19 mx-auto mt-4 flex justify-center">
        <View className="hanzi h-19 text-12 font-light text-white ">
          工作时长
        </View>
        <View className="notHanzi h-19 leading-16 text-16 font-bold mx-6 text-white ">
          {hours}
        </View>
        <View className="hanzi h-19 text-10 font-light text-white ">小时</View>
      </View>
    )
  }
}

export default CountCheckTime
